package cc.openkit.admin.service.shopBrand.impl;

import cc.openkit.admin.dao.ShopBrandMapper;
import cc.openkit.admin.model.ShopBrand;
import cc.openkit.admin.service.common.impl.BaseServiceImpl;
import cc.openkit.admin.service.shopBrand.ShopBrandService;
import com.github.pagehelper.PageHelper;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


@Service
@Transactional(rollbackFor = Exception.class)
public class ShopBrandServiceImpl extends BaseServiceImpl<ShopBrand> implements ShopBrandService{
    private Logger log = Logger.getLogger(ShopBrandServiceImpl.class);

    @Resource
    private ShopBrandMapper shopBrandMapper;
    //查询所有品牌列表
    public List<ShopBrand> findModelPageListByWhere(ShopBrand shopBrand, Integer integer, Integer integer1) {
        PageHelper.startPage(integer, integer1);
        return shopBrandMapper.findModelPageListByWhere(shopBrand);
    }
    //根据Id关联分类表 查询单个品牌
    public ShopBrand findModelById(String id) {
        return shopBrandMapper.findModelById(id);
    }
}
